﻿@model Wlog.Web.Models.ApplicationModel

@{
    Layout = "~/Views/Shared/_LayoutInternal.cshtml";
    ViewBag.Title = "Edit App";
}
<div class="row">
    <h2>EditApp</h2>

    @using (Html.BeginForm("EditApp", "Private", FormMethod.Post))
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

        <fieldset>
            <legend>Application</legend>
            @Html.HiddenFor(model => model.IdApplication)
            <div class="form-horizontal">
                <div class="form-group">
                    @Html.LabelFor(model => model.ApplicationName, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.EditorFor(model => model.ApplicationName, new { htmlAttributes = new { @class = "form-control labellength" } })
                        @Html.ValidationMessageFor(model => model.ApplicationName)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.PublicKey, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(model => model.PublicKey,null, new { @class = "form-control"  , disabled = "disabled", @readonly = "readonly" })
                        @Html.ValidationMessageFor(model => model.PublicKey)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.IsActive, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.EditorFor(model => model.IsActive, new { @class = "form-control" })
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.StartDate, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.EditorFor(model => model.StartDate, new { @class = "form-control" })
                        @Html.ValidationMessageFor(model => model.StartDate)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.EndDate, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.EditorFor(model => model.EndDate, new { @class = "form-control" })
                        @Html.ValidationMessageFor(model => model.EndDate)
                    </div>
                </div>
            </div>



            <p>
                @Html.ActionLink("Back to List", "ListApps", null, new { @class = "btn btn-success btn-list" })
                <input type="submit" value="Save" class="btn btn-warning btn-list  pull-right" />
                @Html.ActionLink("Delete", "DeleteApp", new { Id = Model.IdApplication }, new { @class = "btn btn-danger pull-right btn-list" })
            </p>
        </fieldset>
    }

</div>
